using System;
using System.Collections.Generic;
using System.Text;
using Common.Shared.Design;

namespace Common.Shared.Xml.Wddx {
	[WddxRoot("array")]
	public class WddxArray : WddxDataTypeObject {
		private List<WddxDataTypeObject> _items;

		public WddxArray ( ) {
			this.Items = new List<WddxDataTypeObject> ( );
		}

		[WddxAttribute("length")]
		public int Length {
			get { return Items.Count; }
			set { return; }
		}

		[WddxElement]
		public List<WddxDataTypeObject> Items {
			get { return _items; }
			set { _items = value; }
		}

		public WddxDataTypeObject this[ int index ] {
			get {
				return this.Items[ index ].Value;
			}
		}

	}
}
